package com.wy2cloud.authorize.controller;

import java.security.Principal;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/client")
@RestController
public class ClientController {

    /**
     * 取认证用户信息
     * @param principal
     * @return
     */
    @RequestMapping({ "/userinfo" })
    public Principal user(Principal principal) {
//        Map<String, String> map = new LinkedHashMap<>();
//        map.put("name", principal.getName());
        return principal;
    }
}
